__kernel void GreyScaleLuma(
				read_only image2d_t 	input,
				write_only image2d_t 	output)
{
	int x = get_global_id(0);
	int y = get_global_id(1);
	const sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE | CLK_FILTER_NEAREST | CLK_ADDRESS_CLAMP;
	
	float4 pix = read_imagef(input,sampler,(int2)(x,y));
	float ave = (.2126 * pix.x + pix.y*.7152 + pix.z*.0722);
	pix.xyz = ave;
	write_imagef(output,(int2)(x,y),pix);
}